capture log close
capture noisily log using "R:\Zentrale\ZB-S\Daten_FDSZ_Gastforscher\1_gafo\2016_0133\Table 8.log", replace
capture noisily log using "Table 8.log", replace

**** Load data in Stata
clear all
set more off
set maxvar 5000

capture noisily use "R:\Zentrale\ZB-S\Daten_FDSZ_Gastforscher\1_gafo\2016_0133\data\Bundesbank Discussion Paper\final_sample_03032023.dta", clear
capture noisily use "final_sample_03032023_pseudo.dta", clear


/* Deutsche Bundesbank checks that our results respect all confidentiality
   rules: If we wish to disclose a regression coefficient that identifies a 
   subset of banks, then this subset must contain a minimum number of banks 
   to comply with confidentiality rules. In regressions, this rule applies to 
   categorical regressors (including interacted ones). 

   The Bundesbank uses a self-written command to check compliance with the 
   confidentiality rules. This command does not always execute for 
   higher interactions (especially when the lower-level base effects are 
   absorbed by some FEs). For this reason, we generate a new variable 
   for each interaction term separately: */ 
   
   

qui gen sanctions_notFATF_CTRY = sanctions * notFATF_CTRY
qui gen sanctions_col = sanctions * col
qui gen sanctions_csl = sanctions * csl
qui gen sanctions_cnl = sanctions * cnl
qui gen sanctions_Neighbors = sanctions * Neighbors



**** Table 8

reghdfe lam100 sanctions sanctions_notFATF_CTRY sanctions_col, absorb(systimeFE id) vce(cluster datum land CTRY)

reghdfe lam100 sanctions sanctions_notFATF_CTRY sanctions_csl, absorb(systimeFE id) vce(cluster datum land CTRY)

reghdfe lam100 sanctions sanctions_notFATF_CTRY sanctions_cnl, absorb(systimeFE id) vce(cluster datum land CTRY)

reghdfe lam100 sanctions sanctions_notFATF_CTRY sanctions_Neighbors, absorb(systimeFE id) vce(cluster datum land CTRY)

capture log close
